<?php

namespace App\Http\Requests\System;

use App\Http\Requests\Request;

class OperationRequest extends Request
{
    protected $messages = [
        'Name.required' => '姓名不能为空！',
        'WW.required' => '旺旺不能为空！',
        'Email.required' => '邮箱不能为空！',
        'Email.email' => '请写正确的邮箱格式！',
        'Mobile.required' => '手机号不能为空！',
        'Mobile.numeric' => '手机号必须为数字！'
    ];

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'Name'=>'required',
            'WW'=>'required',
            'Email'=>'required|email',
            'Mobile'=>'required|numeric'

        ];
    }

    public function messages()
    {
        return $this->messages;
    }
}
